[ToC]
[Up]
[Back]
[Next]
... [Book Plug] |
The Information Commons .................... Introduction to HTML |
A multi-frame document does not contain a BODY --- instead it contains a FRAMESET element, which defines the sizes, locations and initial contents of the individual FRAMES.
Here is an example
<FRAMESET ROWS="10%,80%,10%"> <FRAME NAME="window1" SRC="document.html"> <FRAMESET COLS="50%,50%> <FRAME NAME="window2" SRC="doc.html"> <FRAME NAME="window3" SRC="doggy.html"> </FRAMESET> <FRAME NAME="window4" SRC="doc444.html"> <NOFRAME> <BODY BACKGROUND ......> .... stuff to display if the browesr does not understand FRAMESET... </NOFRAME> </FRAMESET>This first divides the display into three slices, the top and bottom being thing (10% of the display height), the remainder going to the middle frame. The first slice is named window1, and is initially loaded with the document document1.html -- the FRAME element defines the initial content of the cell (frames may be empty, in which case you leave out the SRC). The second slice is divided, by columns, intow two frames -- named window2 and window 3. And so on.
Once the frames are named, then a hypertext anchor can be instructed to targetthe returned data to a particular frame. This is done using a new TARGET attribute for A elements. For example, If a document contained the anchor
<A HREF="some_stuff.html TARGET="window3">link text</A>Netscape 2.0 would take the retrieved data and place it in the window named "window3", regardless of where the link was selected.
Programming FRAMEs is a bit more complicated than regular documents. Recall that the browser's back button no longer works the way you would expect, as the button implies back with respect to the entire displayed area, and not just back in a single frame. Also, many computers only have 640x480 pixel displays -- so don't get carried away, creating pages with multiple framed areas -- you lose lots of space with the frame borders, and often do not add anything useful to the displayed information.
There is an excellent interactive FRAMEs tutorial by Charlton Rose, which you will find at
This tutorial is best viewed using a FRAME-capable browser (Netscape Navigator Version 2.0). However, you can still read the content with older FRAME-incapable browsers such as Netscape 1.1, Mosaic or Microsoft Internet Explorer.You will also find additional details on FRAMEs at the Netscape onlinke
documentation page, found at:
[ToC]
[Up]
[Back]
[Next]
... [Book Plug] | .................... Introduction to HTML |
© Ian Graham 1994-1995 | Page Last Updated: 11 March 1996 |